<%@ page import="com.wmm.bean.Student" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>更新学生信息界面</title>
</head>
<body bgcolor="#87cefa">
<h1 align="center">更新学生信息</h1>
    <%
       Student updateStudent = (Student) session.getAttribute("updateStudent");
       if(null != updateStudent) {
           %>
<form action="updateInfo" method="post" id="form1">
    学  号：<input type="text" name="studentno" id="no" required="required" readonly="readonly" value="${updateStudent.getId()}" /><br/><br/>
    姓  名：<input type="text" name="username" id="name1" required="required" value="${updateStudent.getName()}"/><br/><br/>
    <%
        if("${updateStudent.getSex()}" == "男"){
            %>
    性  别：<input type="radio" name="sex" value="男" required="required" checked="checked" />男
    <input type="radio"  name="sex" value="女" />女<br/><br/>

    <%
        }
        else {
            %>
    <input type="radio" name="sex" value="男" required="required"  />男
    <input type="radio"  name="sex" value="女" checked="checked"/>女<br/><br/>

    <%
        }
    %>
    出生日期：<input type="date" name="bdate" required="required" value="${updateStudent.getBirthday()}" /><br/><br/>
    邮  箱：<input type="email" name="email" required="required" value="${updateStudent.getMailbox()}"/><br/><br/>
    备注：<input type="text" name="extra" required="required" value="${updateStudent.getMemo()}"/><br/><br/>
    <span style="color: red">
            <%

                String addError = (String)session.getAttribute("addError");
                if(addError != null) {
                    out.println(addError);
                }
            %>
        </span>
    <br/>
    <input type="submit" value="提交" />
</form>
<%

       }
    %>
</body>
</html>
